﻿using CRM.Authorization.Permissions;
using System;
using System.Collections.Generic;
using Model = CRM.Models.Menu;

namespace CRM.Models.SeedData
{
    public class MenuData : ISeedData<Model>
    {
        public static DateTime DefaultTime =
            new DateTime(2021, 5, 31, 15, 49, 7, 801, DateTimeKind.Local).AddTicks(7508);

        public IEnumerable<Model> Get()
        {
            var date = DefaultTime;
            return new List<Model>()
            {
                new(nameof(DataSearch), DataSearch.MODULE)
                {
                    Id = 1, Path = "/data-search", Component = "Layout", CreatedAt = date,
                    UpdatedAt = date, Name = "dataSearch", Sort = 29,
                    Redirect = "/data-search/index",
                    Meta = new MetaSt() {Title = "dataSearch", Icon = "search"}
                },

                new(nameof(DataSearch), DataSearch.Index)
                {
                    Id = 2, ParentId = 1, Path = "index", Component = "data-search/index", CreatedAt = date,
                    UpdatedAt = date, Name = "dataSearch",
                    Meta = new() {Title = "dataSearch", Icon = "arrow"}
                },
                new(nameof(DataSearch), DataSearch.GlobalEngine)
                {
                    Id = 3, ParentId = 1, Path = "global-engine", Component = "data-search/global-engine",
                    CreatedAt = date, UpdatedAt = date, Name = "globalEngine",
                    Meta = new() {Title = "globalEngine", Icon = "arrow", NoCache = false}
                },
                new(nameof(EmailMarketing), EmailMarketing.MODULE)
                {
                    Id = 4, Path = "/email", Component = "Layout", Redirect = "/email/email-marketing",
                    CreatedAt = date, UpdatedAt = date, Name = "email", Sort = 40,
                    Meta = new() {Title = "email", Icon = "email",}
                },
                new(nameof(EmailMarketing), EmailMarketing.Index)
                {
                    Id = 5, ParentId = 4, Path = "/email/emailMarketingTask/index",
                    Component = "email/emailMarketingTask/index", CreatedAt = date, UpdatedAt = date,
                    Name = "emailMarketingTask",
                    Meta = new() {Title = "emailMarketingTask", Icon = "arrow"}
                },
                new(nameof(SocialMarketingTasks), SocialMarketingTasks.MODULE)
                {
                    Id = 7, Path = "/social-marketing", Component = "Layout", CreatedAt = date,
                    UpdatedAt = date, Name = "socialMarketing", Sort = 50,
                    Redirect = "/social-marketing/index",
                    Meta = new() {Title = "socialMarketing", Icon = "peoples",}
                },
                new(nameof(SocialMarketingTasks), SocialMarketingTasks.INDEX)
                {
                    Id = 8, ParentId = 7, Path = "index", Component = "social-marketing/index",
                    CreatedAt = date, UpdatedAt = date, Name = "socialMarketing",
                    Meta = new() {Title = "socialMarketing", Icon = "arrow"}
                },
                new(nameof(SocialMarketingTasks), SocialMarketingTasks.BIND)
                {
                    Id = 9, ParentId = 7, Path = "social-account-bind", CreatedAt = date,
                    UpdatedAt = date, Name = "socialAccountBind",
                    Component = "social-marketing/social-account-bind",
                    Meta = new() {Title = "socialAccountBind", Icon = "arrow"}
                },
                new(nameof(SocialMarketingTasks), SocialMarketingTasks.RECYCLE)
                {
                    Id = 10, ParentId = 7, Path = "recycle-bin", Component = "social-marketing/recycle-bin",
                    CreatedAt = date, UpdatedAt = date, Name = "recycleBin",
                    Meta = new() {Title = "recycleBin", Icon = "arrow"}
                },
                new(nameof(EmailMarketing), EmailMarketing.EmailTemplate)
                {
                    Id = 11, ParentId = 4, Path = "/email/emailTemplate/index", Component = "email/emailTemplate/index",
                    CreatedAt = date, UpdatedAt = date,
                    Name = "emailTemplate",
                    Meta = new() {Title = "emailTemplate", Icon = "arrow"}
                },
                //路由 router.ts 94-121
                //new(nameof(EmailMarketing), EmailMarketing.MODULE)
                //{
                //    Id = 12, ParentId = 4, Path = "/email/emailServerSend/add", Component = "email/emailServerSend/add",
                //    CreatedAt = date, UpdatedAt = date,
                //    Name = "createMarketingTaskByServer",
                //    Meta = new() {Title = "createMarketingTaskByServer", Hidden = true, Icon = "arrow"}
                //},
                new(nameof(EmailMarketing), EmailMarketing.EmailSendFree)
                {
                    Id = 13, ParentId = 4, Path = "/email/emailSendFree/index", Component = "email/emailSendFree/index",
                    CreatedAt = date, UpdatedAt = date,
                    Name = "emailSendFree",
                    Meta = new() {Title = "emailSendFree", Icon = "arrow"}
                },
                new(nameof(EmailMarketing), EmailMarketing.EmailServerSend)
                {
                    Id = 14, ParentId = 4, Path = "/email/emailServerSend/index",
                    Component = "email/emailServerSend/index", CreatedAt = date, UpdatedAt = date,
                    Name = "emailServerSend",
                    Meta = new() {Title = "emailServerSend", Icon = "arrow"}
                },
                new(nameof(EmailMarketing), EmailMarketing.EmailSendHistory)
                {
                    Id = 15, ParentId = 4, Path = "/email/emailSendHistory/index",
                    Component = "email/emailSendHistory/index", CreatedAt = date, UpdatedAt = date,
                    Name = "emailSendHistory",
                    Meta = new() {Title = "emailSendHistory", Icon = "arrow"}
                },
                //路由 router.ts 94-121
                //new(nameof(EmailMarketing), EmailMarketing.MODULE)
                //{
                //    Id = 16, ParentId = 4, Path = "/email/emailSendFree/add", Component = "email/emailSendFree/add",
                //    CreatedAt = date, UpdatedAt = date,
                //    Name = "emailSendFreeAdd",
                //    Meta = new() {Title = "emailSendFreeAdd", Hidden = true}
                //},
                new(nameof(SystemManager), SystemManager.MODULE)
                {
                    Id = 17, Path = "systemManage", Component = "Layout", CreatedAt = date,
                    UpdatedAt = date, Desc = "系统管理", Name = "SystemManage", Sort = 10,
                    Meta = new() {Title = "SystemManage", Icon = "system"}
                },
                new(nameof(UserManager), UserManager.MODULE)
                {
                    Id = 18, Path = "userManage", Component = "Layout", CreatedAt = date,
                    UpdatedAt = date, Desc = "用户管理", Name = "UserManage", Sort = 20,
                    Meta = new() {Title = "UserManage", Icon = "users"}
                },
                new(nameof(SystemManager), SystemManager.OEM)
                {
                    Id = 19, ParentId = 17, Path = "/systemManage/oem/index", Component = "systemManage/oem/index",
                    CreatedAt = date, UpdatedAt = date, Desc = "OEM管理", Name = "Oem", Sort = 20,
                    Meta = new() {Title = "Oem", Icon = "arrow"}
                },
                new(nameof(UserManager), UserManager.RULE)
                {
                    Id = 20, ParentId = 18, Path = "/userManage/ruleTemplate/index",
                    Component = "userManage/ruleTemplate/index", Sort = 10,
                    CreatedAt = date, UpdatedAt = date, Desc = "权限模版", Name = "RuleTemplate",
                    Meta = new() {Title = "RuleTemplate", Icon = "arrow"}
                },
                new(nameof(UserManager), UserManager.GROUP)
                {
                    Id = 21, ParentId = 18, Path = "/userManage/group/index", Component = "userManage/group/index",
                    CreatedAt = date, UpdatedAt = date, Desc = "用户组管理", Name = "UserGroup", Sort = 20,
                    Meta = new() {Title = "UserGroup", Icon = "arrow"}
                },
                new(nameof(UserManager), UserManager.COMPANY)
                {
                    Id = 22, ParentId = 18, Path = "/userManage/company/index", Component = "userManage/company/index",
                    CreatedAt = date, UpdatedAt = date, Desc = "公司用户", Name = "UserCompany", Sort = 30,
                    Meta = new() {Title = "UserCompany", Icon = "arrow"}
                },
                new(nameof(UserManager), UserManager.EMPLOYEE)
                {
                    Id = 23, ParentId = 18, Path = "/userManage/employee/index",
                    Component = "userManage/employee/index", Sort = 40,
                    CreatedAt = date, UpdatedAt = date, Desc = "员工用户", Name = "UserEmployee",
                    Meta = new() {Title = "UserEmployee", Icon = "arrow"}
                },
                new(nameof(CustomerManager), CustomerManager.MODULE)
                {
                    Id = 24, Path = "/customer", Component = "Layout", CreatedAt = date,
                    UpdatedAt = date, Name = "Customer", Sort = 30,
                    Meta = new() {Title = "Customer", Icon = "customer"}
                },
                new(nameof(CustomerManager), CustomerManager.HOME)
                {
                    Id = 25, ParentId = 24, Path = "/home-page", CreatedAt = date, UpdatedAt = date,
                    Component = "customer/home/index", Name = "CustomerHomePage",
                    Meta = new() {Title = "CustomerHomePage", Icon = "arrow",}
                },
                new(nameof(CustomerManager), CustomerManager.INDEX)
                {
                    Id = 26, ParentId = 24, Path = "/customer-list-index", CreatedAt = date, UpdatedAt = date,
                    Component = "customer/index/collect", Name = "CustomerListIndex",
                    Meta = new() {Title = "CustomerListIndex", Icon = "arrow",}
                },
                new(nameof(CustomerManager), CustomerManager.LABEL)
                {
                    Id = 27, ParentId = 24, Path = "/label-list-index", CreatedAt = date, UpdatedAt = date,
                    Component = "customer/label/index", Name = "CustomerLabelListIndex",
                    Meta = new() {Title = "CustomerLabelListIndex", Icon = "arrow",}
                },
                new(nameof(CustomerManager), CustomerManager.GROUP)
                {
                    Id = 28, ParentId = 24, Path = "/group-list-index", CreatedAt = date, UpdatedAt = date,
                    Component = "customer/group/index", Name = "CustomerGroupListIndex",
                    Meta = new() {Title = "CustomerGroupListIndex", Icon = "arrow",}
                },
                new(nameof(CustomerManager), CustomerManager.SOURCE)
                {
                    Id = 29, ParentId = 24, Path = "/source-list-index", CreatedAt = date, UpdatedAt = date,
                    Component = "customer/source/index", Name = "CustomerSourceListIndex",
                    Meta = new() {Title = "CustomerSourceListIndex", Icon = "arrow",}
                },
                //路由 router.ts 94-121
                //new(nameof(EmailMarketing), EmailMarketing.MODULE)
                //{
                //    Id = 30, ParentId = 4, Path = "/email/emailTemplate/add", Component = "email/emailTemplate/add",
                //    CreatedAt = date, UpdatedAt = date,
                //    Name = "emailTemplateAdd",
                //    Meta = new() {Title = "emailTemplateAdd", Hidden = true}
                //},
                //new(nameof(EmailMarketing), EmailMarketing.MODULE)
                //{
                //    Id = 31, ParentId = 4, Path = "/email/emailTemplate/edit", Component = "email/emailTemplate/edit",
                //    CreatedAt = date, UpdatedAt = date,
                //    Name = "emailTemplateEdit",
                //    Meta = new() {Title = "emailTemplateEdit", Hidden = true}
                //},
                new(nameof(SystemManager), SystemManager.COMPANY)
                {
                    Id = 32, ParentId = 17, Path = "/systemManage/company/index",
                    Component = "systemManage/company/index", Sort = 10,
                    CreatedAt = date, UpdatedAt = date, Desc = "公司配置", Name = "CompanyConfig",
                    Meta = new() {Title = "CompanyConfig", Icon = "arrow"}
                },
                new(nameof(SystemManager), SystemManager.System)
                {
                    Id = 34, ParentId = 17, Path = "/systemManage/system/index",
                    Component = "systemManage/system/index", Sort = 9,
                    CreatedAt = date, UpdatedAt = date, Desc = "系统配置", Name = "SystemConfig",
                    Meta = new() {Title = "SystemConfig", Icon = "arrow"}
                },
                new(nameof(SystemManager), SystemManager.Junior)
                {
                    Id = 33, ParentId = 17, Path = "/systemManage/junior/index",
                    Component = "systemManage/junior/index", Sort = 20,
                    CreatedAt = date, UpdatedAt = date, Desc = "下级信息", Name = "JuniorList",
                    Meta = new() {Title = "JuniorList", Icon = "arrow"}
                },

                #region 买家数据模块
                new(nameof(BuyersData), BuyersData.MODULE)
                {
                    Id = 50, Path = "/buyerData", Component = "Layout", CreatedAt = date,
                    UpdatedAt = date, Name = "buyerData", Sort = 60,
                    Redirect = "/buyerData/buyerData/index",
                    Meta = new() {Title = "buyerData", Icon = "excel"}
                },
                new(nameof(BuyersData), BuyersData.BuyerSearch)
                {
                    Id = 51, ParentId = 50, Path = "/buyerData/buyerSearch/index",
                    Component = "buyerData/buyerSearch/index",
                    CreatedAt = date, UpdatedAt = date, Desc = "买家数据搜索", Name = "buyerSearch",
                    Meta = new() {Title = "buyerSearch", Icon = "arrow"}
                },
                new(nameof(BuyersData), BuyersData.BuyerData)
                {
                    Id = 52, ParentId = 50, Path = "/buyerData/buyerData/index",
                    Component = "buyerData/buyerData/index",
                    CreatedAt = date, UpdatedAt = date, Desc = "买家数据", Name = "buyerData",
                    Meta = new() {Title = "buyerData", Icon = "arrow"}
                },
                new(nameof(BuyersData), BuyersData.UserData)
                {
                    Id = 53, ParentId = 50, Path = "/buyerData/userData/index",
                    Component = "buyerData/userData/index",
                    CreatedAt = date, UpdatedAt = date, Desc = "个人发布", Name = "userData",
                    Meta = new() {Title = "userData", Icon = "arrow"}
                },
                new(nameof(BuyersData), BuyersData.Go4world)
                {
                    Id = 54, ParentId = 50, Path = "/buyerData/go4world/index",
                    Component = "buyerData/go4world/index",
                    CreatedAt = date, UpdatedAt = date, Desc = "Go4world", Name = "go4world",
                    Meta = new() {Title = "go4world", Icon = "arrow"}
                },
                new(nameof(BuyersData), BuyersData.Exporthub)
                {
                    Id = 55, ParentId = 50, Path = "/buyerData/exporthub/index",
                    Component = "buyerData/exporthub/index",
                    CreatedAt = date, UpdatedAt = date, Desc = "Exporthub", Name = "exporthub",
                    Meta = new() {Title = "exporthub", Icon = "arrow"}
                },
                #endregion 

                new(nameof(customsData), customsData.MODULE)
                {
                    Id = 60, Path = "/customsData", Component = "Layout", CreatedAt = date,
                    UpdatedAt = date, Name = "customsData", Sort =60,Desc="海关数据",
                    Redirect = "/customsData/uploadCustomsData/index",
                    Meta = new() {Title = "customsData", Icon = "excel"}
                },
                new(nameof(customsData), customsData.uploadCustomsData)
                {
                    Id = 61, ParentId = 60, Path = "/customsData/uploadCustomsData/index",
                    Component = "customsData/uploadCustomsData/index",
                    CreatedAt = date, UpdatedAt = date, Desc = "上传海关数据", Name = "uploadCustomsData",  Sort =61,
                    Meta = new() {Title = "uploadCustomsData", Icon = "arrow"}
                },
                new(nameof(customsData), customsData.searchCustomsData)
                {
                    Id = 62, ParentId = 60, Path = "/customsData/searchCustomsData/index",  Sort =62,
                    Component = "customsData/searchCustomsData/index",
                    CreatedAt = date, UpdatedAt = date, Desc = "查询海关数据", Name = "searchCustomsData",
                    Meta = new() {Title = "searchCustomsData", Icon = "arrow"}
                },
                new(nameof(customsData), customsData.searchCustomsData)
                {
                    Id =63, ParentId = 60, Path = "/customsData/searchCustomsData/seachDetailCustomData",
                    Component = "customsData/searchCustomsData/seachDetailCustomData",
                    CreatedAt = date, UpdatedAt = date, Desc = "海关数据列表", Name = "seachDetailCustomData", Sort =63,
                    Meta = new() {Title = "seachDetailCustomData", Icon = "arrow"}
                },

                #region 日志
                new(nameof(LoggingInfo), LoggingInfo.MODULE)
                {
                    Id = 70, Path = "/logging", Component = "Layout", CreatedAt = date,
                    UpdatedAt = date, Name = "logging", Sort = 80,
                    Redirect = "/logging/buyerDataLog/index",
                    Meta = new() {Title = "logging", Icon = "excel"}
                },
                new(nameof(LoggingInfo), LoggingInfo.buyerDataLog)
                {
                    Id = 71, ParentId = 70, Path = "/logging/buyerDataLog/index",
                    Component = "/logging/buyerDataLog/index",
                    CreatedAt = date, UpdatedAt = date, Desc = "卖家数据拉取日志", Name = "buyerDataLog",
                    Meta = new() {Title = "buyerDataLog", Icon = "arrow"}
                },
                new(nameof(LoggingInfo), LoggingInfo.verificationLog)
                {
                    Id = 72, ParentId = 70, Path = "/logging/verificationLog/index",
                    Component = "/logging/verificationLog/index",
                    CreatedAt = date, UpdatedAt = date, Desc = "验证码日志", Name = "verificationLog",
                    Meta = new() {Title = "verificationLog", Icon = "arrow"}
                },
                #endregion 
                
                // new(nameof(EmailMarketing), EmailMarketing.EmailRushEmailSend)
                // {
                //     Id = 73, ParentId = 4, Path = "/email/emailRushEmailSend/index",
                //     Component = "email/emailServerSend/index", CreatedAt = date, UpdatedAt = date,
                //     Name = "emailRushEmailSend",
                //     Meta = new() {Title = "emailRushEmailSend", Icon = "arrow"}
                // },
                new(nameof(customsData), customsData.Data10086)
                {
                    Id = 74, ParentId = 60, Path = "/customsData/data10086/index",
                    Component = "customsData/data10086/index", CreatedAt = date, UpdatedAt = date,
                    Desc = "Data10086", Name = "data10086",
                    Meta = new() {Title = "data10086", Icon = "arrow"}
                },
            };
        }
    }
}